package cn.pangza.user.entity.po;

import cn.pangza.common.mybatisplus.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.util.Date;
import java.io.Serializable;
import java.util.List;

@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Menu extends BaseEntity {

    @TableId(type = IdType.AUTO)
    private Integer id;
    /**
     * 标题
     */
    private String title;
    /**
     * 组件名
     */
    private String name;

    /**
     * 组件路径
     */
    private String path;

    /**
     * 父级路由
     */
    private Integer parentId;

    @TableField(exist = false)
    private RouterMetaObject meta;

    private Integer orderNum;

    @TableField(exist = false)
    private List<Menu> children;


    /**
     * 图标
     */
    private String icon;

    /**
     * 是否为按钮
     */
    private Boolean button;

    /**
     * 是否展示
     */
    @TableField(value = "`show`")
    private Boolean show;
    /**
     * 页面权限
     */
    private String permission;
    /**
     * 是否需要登录可访问
     */
    private Integer auth;

}

